package com.javaranger.jvm;

/**
 * Args -Xss128k
 * @author tao.wang
 *
 */
public class JvmStackOverFlow {
	
	private int stackLength = 1;

	private void stackLeak(){
		stackLength++;
		stackLeak();
	}
	
	public static void main(String[] args) {
		JvmStackOverFlow sof = new JvmStackOverFlow();
		try {
			sof.stackLeak();
		} catch (Throwable e) {
			System.out.println(sof.stackLength);
		}
	}
}
